<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
    <script type="text/javascript">
        function go() {
            var lovationObj =window.location;
            lovationObj.href ="http://www.baidu.com"
        }
    </script>
<body>
    <input type="button" value="go" onclick="go()" >
</body>
</html>